import request from '@/utils/request'

//1. 查询所有员工
export function findEmps(data) {
  return request({
    url: '/emp/list.do',
    method: 'post',
    data
  })
}

//2. 分页带条件查询员工
export function search(page,pagesize,data) {
  return request({
    url: `/emp/search.do?page=${page}&pagesize=${pagesize}`,
    method: 'post',
    data
  })
}

//添加
export function add(data){
  return request({
    url: `/emp/add.do`,
    method:'post',
    data
  })
}
//修改
export function update(data){
  return request({
    url: `/emp/update.do`,
    method:'post',
    data
  })
}
//删除
export function delet(data){
  return request({
    url:`emp/delete.do`,
    method:'post',
    data
  })
}
